package com.llu.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient("userservice")
public interface UserFeignClient {
    // 查找用户信息根据uid
    @RequestMapping("/user/{uid}")
    com.llu.entity.User getUserById(@PathVariable("uid") int uid);
    // uid 借书
    @GetMapping("/user/borrow/{uid}")
    boolean userBorrow(@PathVariable("uid") int uid);

    // uid 剩余的可借的数量
    @GetMapping("/user/remain/{uid}")
    int userRemain(@PathVariable("uid") int uid);
}
